#ifndef __DISP_H
#define __DISP_H
#include <NeoPixelBus.h>

#define MAX_BRIGHTNESS 200
#define DEFAULT_BRIGHTNESS 0.5f
#define ORANGE 200, 60, 0

#define setColor(r, g, b) COLOR = (uint32_t)((uint32_t)(r*brightness)<<16)|(uint32_t)((uint32_t)(g*brightness)<<8)|(uint32_t)(b*brightness)
#define setBrightness(x) brightness = x
#define getBrightness() brightness

extern uint32_t COLOR;
extern float brightness;

void drawPoint(int8_t x, int8_t y, uint8_t en);
uint8_t drawChar(char c, int8_t x, int8_t y, uint8_t height);
void drawNum(uint8_t num, int8_t x, int8_t y);
void drawString(char *p, int8_t x, int8_t y);
void drawBitmapRGB(const uint32_t *p, int8_t x, int8_t y, uint8_t w, uint8_t h);
void disp(void);
void dispClear(void);

void rgbInit(void);
void analogTask(void);
void uiTask(void);

#endif